package 线程;

public class test2 {
    public static void main(String[] args) {
        int moutain=2000;
        ClimbThread c1=new ClimbThread(2,moutain/100);
        ClimbThread c2=new ClimbThread(5,moutain/100);
        Thread thread1=new Thread(c1);
        Thread thread2=new Thread(c2);
        thread1.setName("张三");
        thread1.start();
        thread2.setName("李四");
        thread2.start();
        if (c1.millions==10){
            if (thread1.getName().equals("张三")){
                System.out.println("对手太慢睡一秒等一下");
                try {
                    Thread.sleep(100);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }

    }
}
